﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ViewModels="clr-namespace:ScrumSprintMonitor.Modules.WorkItemMonitor.ViewModels"
    xmlns:MonitorWindow="clr-namespace:ScrumSprintMonitor.UI.Wpf.Views.MonitorWindow;assembly=ScrumSprintMonitor.UI.Wpf">

    <DataTemplate DataType="{x:Type ViewModels:TeamMemberViewModel}">
        <Viewbox>
            <ContentPresenter Content="{Binding}">
                <ContentPresenter.Style>
                    <Style TargetType="{x:Type ContentPresenter}">
                        <Setter Property="ContentTemplate">
                            <Setter.Value>
                                <DataTemplate>
                                    <MonitorWindow:TeamMemberBadge/>
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>

                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Path=Unassigned}" Value="True">
                                <Setter Property="ContentTemplate">
                                    <Setter.Value>
                                        <DataTemplate>
                                            <MonitorWindow:UnassignedTeamMemberBadge />
                                        </DataTemplate>
                                    </Setter.Value>
                                </Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </ContentPresenter.Style>
            </ContentPresenter>
        </Viewbox>
    </DataTemplate>
</ResourceDictionary>